// my 个人中心
import fetch from '../config/fetch'
import { API_PATH } from '../config/env'
/**
 * 我的订单列表
 */
export const myOrder = (token, state, since, before) => fetch(API_PATH + '/my/orders', {
  token,
  state,
  since,
  before
}, 'POST')

/**
 * 获取个人中心数据统计
 */
export const mySummary = (token) => fetch(API_PATH + '/my/summary', {
  token
}, 'POST')

/**
 * 获取积分记录
 */
export const myPoints = (token, type, since, before) => fetch(API_PATH + '/my/point-record', {
  token,
  type,
  since,
  before
}, 'POST')

/**
 * 获取通知列表
 */
export const myNotices = (token, since, before) => fetch(API_PATH + '/my/notices', {
  token,
  since,
  before
}, 'POST')
